<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head th:replace="common/form :: head"></head>
	
	<body class="mainbody">
		<form method="POST" th:object="${obj}" enctype="multipart/form-data">
			<div th:replace="common/form :: location('问题反馈',*{id} gt 0 ?'修改问题反馈信息':'新增问题反馈')"></div>
			<div id="floatHead" class="content-tab-wrap">
			  <div class="content-tab">
			    <div class="content-tab-ul-wrap">
			      <ul>
			        <li><a href="javascript:;">问题反馈信息</a></li>
			      </ul>
			    </div>
			  </div>
			</div>
			<div class="tab-content">
				<dl>
					<dt>问题反馈</dt>
				    <dd>
				      <input type="text" th:field="*{massage}" class="input normal" data-type="*1-500"/>
				      <span class="Validform_checktip">*请输入问题反馈</span>
				    </dd>
				</dl>
				<dl>
					<dt>评分</dt>
				    <dd>
				      <input type="text" th:field="*{point}" class="input normal" data-type="*1-5" />
				      <span class="Validform_checktip">*请输入评分</span>
				    </dd>
				</dl>
		
				<dl>
					<dt>联系方式</dt>
				    <dd>
				      <input type="text" th:field="*{line}" data-type="m" class="input normal" />
				      <span class="Validform_checktip">*请填写联系方式</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>问题图片</dt>
					<dd>
						<input type="file" name="PICN" onchange="previewFile()" /><br/>
						<img th:src="${pro}+*{imgurl}" height="250px" width="10px" alt="Image preview..." class="input normal"/>
						<span class="Validform_checktip">*请选择问题图片</span>
					</dd>
				</dl>
				
				<dl>
					<dt>状态</dt>
					<dd>
				    <label style="width: 80px;"> 
        				<input th:field="*{state}" type="radio" name="mode" value="已处理"/>&nbsp;&nbsp;已处理
    				</label>
    				
    				<label style="width: 80px;"> 
        				<input th:field="*{state}" type="radio" name="mode" value="未处理"/>&nbsp;&nbsp;未处理
    				</label>
    				</dd>
				</dl>
				 
			</div>
			<div th:replace="common/form :: footer"></div>
		</form>

		<script type="text/javascript" th:replace="common/form :: formscript">
		</script>
		<script type="text/javascript">
		//图片预览
		function previewFile() {
			 var preview = document.querySelector('img');
			 var file  = document.querySelector('input[type=file]').files[0];
			 var reader = new FileReader();
			 reader.onloadend = function () {
			  preview.src = reader.result;
			 }
			 if (file) {
			  reader.readAsDataURL(file);
			 } else {
			  preview.src = "";
			 }
		}	
		
		</script>
	</body>
</html>